
const app = getApp();
Page({
  data: {
    WelfareList:[],
   
  },

  goDetail(e) {
    const id = e.currentTarget.dataset.id;
    console.log("传进来的id是:",id);
    wx.navigateTo({
      url: '/pages/WelfareDetail/WelfareDetail?id=' + id
    })
  },
  onLoad:function(options){
    wx.cloud.callFunction({
      name:"queryWelfare",
      success:res =>{
        console.log("查询公益成功",res)
        this.setData({
          WelfareList:res.result.data
        })
      }
    })
  }
});